1. Field of the Invention
The present invention relates to an interface detecting circuit mounted in electronic devices such as mobile devices and an interface detecting method. More particularly, in an interface system, in which a device and the host are connected through a USB (Universal Serial BUS) cable, the present invention relates to an interface detecting circuit and interface detecting method for detecting the type of the host and the connecting state on the device side.
2. Description of the Related Art
The USB has been widely used as a general-purpose interface. The USB is a standard specification, which is standardized by USB-IF (USB Implementers Forum) and a serious bus for connecting host devices such personal computers with peripheral devices such as a mouse and a keyboard. The USB offers features of allowing peripheral devices such as a keyboard, mouse, modem and joy stick to connect with a personal computer through a single interface and making the connection simple utilizing less costly parts.
A well-known USB connector apparatus has a USB plug (Series A Plug) and a USB socket (Series A Receptacle) to connect with the USB plug (Series A Plug).
The USB plug is provided on an end of a cable to connect with a memory medium such as a portable disk, MP3 player and a recording pen and formed by covering a substrate section (which may be referred to as “base section”), in which a plurality of connecting terminals are fixed on the surface thereof covered with a ring-like metallic casing layer.
This substrate section is provided inside the metallic casing layer such that it is in a firm contact with the bottom surface of the casing layer and a connection nipping layer for use in connecting to the USB socket (Series A Receptacle) is possessed between the surface of the substrate section and the top face of the casing layer.
On the other hand, the USB socket, to which the USB plug is to be connected, has a metallic casing which is fitted to the outside of the casing layer of the USB plug and a nipping plate section (projecting plate section) the periphery of which is covered with a casing and which is inserted into the connection nipping layer of the USB plug so that it is nipped between the casing layer and the plate section. Contact pins to connect with the connecting terminals are disposed on the bottom side of the nipping plate section, so that, if the USB plug is connected to the USB socket, the contact pins are connected to the connecting terminals.
The plurality of the connecting terminals which are connected when the USB plug is inserted into the USB socket (Series A Receptacle) are terminals for VCC power circuit, GND power circuit, D+data transmission circuit and D−data transmission circuit. The D+data transmission circuit terminal and the D−data transmission circuit terminal are used for data transmission, and the VCC power circuit terminal and the GND power circuit terminal can receive a working current supplied by the USB host or the power supplying device.
Hereinafter, the terminals for the VCC power circuit, GND power circuit, D+data transmission circuit and D−data transmission circuit will be referred to as USB terminals and will be, collectively, referred to as USB terminal parts.
Because the USB (Series A) connector apparatus includes only four USB terminals, it can be considered to transmit a larger amount of information by increasing the number of terminals for signal transmission.
For example, between connecting terminals on the top face of the plate part of a USB plug of some USB connector, other connecting terminal for transmitting another signal is provided, and a contact pin is formed at a position matching the other connecting terminal of the substrate part of the USB plug to be connected on a USB socket nipping plate.
The USB employs a protocol of master/slave and devices using the USB interface have the relationship host and device. Usually, when connecting peripheral devices, it is necessary to provide at least one of the peripheral devices with a function as the host.
USB-OTB (USB On-The-Go), which allows the device side to supply electricity when the peripheral devices are connected, has been released, so that the peripheral device is operated as dual-role device which can serves as a device or a host. However, the function of SRP (Session Request Protocol) or HNP (Host Negotiation Protocol) is required to operate the USB-OTG thereby leading to increase in cost on the fields of software and hardware.
Patent Document 1 has disclosed a USB interface system in which the device and the host are connected through the USB cable such that the GND voltage of the ID terminal of the Mini-A receptacle is detected on the device side while electricity is supplied to the host side.
FIG. 1 is a diagram showing the configuration of the USB interface system described in Patent Document 1.
Referring to FIG. 1, USB interface system 10 includes peripheral device (hereinafter referred to as host) 11, which implements the function of the USB host, device (hereinafter simply “device”) 12 which take the function of the USB device and USB cable 13 for connecting these.
According to USB2.0, the USB is constituted of a VBUS as a power line, D+line as a plus side data line, D−terminal as minus side data line, ground (GND) line and ID line for use in distinguishing a host or a device in the dual role device. Supply of electricity to a peripheral device on one side is carried out through the VBUS line. By transferring data serially on a pair of data lines constituted of the D+line and D−line, high speed data transfer is achieved.
Host 11 is controlled by a host controller (not shown), so that all processing generated in bus are started by the host. Host 11 includes Mini-A receptacle 14, which is a connector specialized for the host. Mini Mini-A plug 15 of the USB cable 13 can be inserted into Mini-A receptacle 14.
Device 12 includes a USB device controller (not shown). Because data transfer is controlled by a host controller, even if data is sent from the device side, no data can be sent unless the host gives a right of use of the bus to the device. Device 12 includes Mini-B receptacle 16, which is a connector specialized for the device. Mini-B plug 17 of the USB cable can be inserted into Mini-B receptacle 16. In the meantime, the device that performs the role of the device will be referred to as “B device”.
USB cable 13 has a directivity and includes Mini-A plug 15 on one end and Mini-b plug 17 on the other end. Different shapes of the connectors on both ends of the cable prevent the USB hosts or USB devices to connect with each other by mistake.
While a USB connector of a conventional full size (standard) is provided with four terminals, these new connectors (plug and receptacle) have five terminals. That is, they have an ID terminal as well as the VBUS terminal, D+terminal, D−terminal and GND terminal. The ID terminal is used to, when a plug is inserted into a dual role device having the Mini-AB receptacle, distinguish whether it is Mini-A plug or Mini-B plug. Because in an ordinary USB cable based on USB-OTG, the ID terminal of the Mini-A plug is short-circuited by the GND line and the ID terminal of the Mini-B plug is open, which the Mini-A plug or the Mini-B plug has been connected can be determined by measuring the voltage level of the ID terminal.
In USB cable 13, the ID terminals of Mini-A plug 15 and Mini-B plug 17 are connected straightly through the ID line. The ID terminal of Mini-A receptacle 14 on the host side is connected to the GND line. Thus, if host 11 and device 12 are connected by USB cable 13, the ID terminal on device 12 side is connected to the GND line.
The ID terminal on device 12 side is pulled up. That is, the ID terminal is connected to a power supply Vcc through the pull-up resistor Rp and maintained at a predetermined voltage level (“H” level). Device 12 has power supplying section 18 for supplying electricity to the VBUS terminal. Power supply section 18 monitors the voltage level of the ID terminal and when it detects that the voltage level has dropped to a predetermined level (“L” level), starts supply of electricity.
In the system having the above-described configuration, if host 11 and device 12 are connected by USB cable 13, the ID terminal on device side 12 is short-circuited by the GND line so that the voltage level of the ID terminal drops. If power supply section 18 detects that the voltage level of the ID terminal is dropped from “H” to “L”, it starts supply of electricity to the VBUS terminal, so that electricity is supplied to host 11 through the VBUS line of USB cable 13.
Patent Document 1: Japanese Patent Application Laid-Open No. 2005-25405
However, such a conventional USB interface system has following problems.
A mobile telephone having the USB terminal needs to connect with every kind of the peripheral device for the reason for diversification and multi-functionalization of the mobile telephone and as a result, the mobile telephone on the device side cannot meet demands from every kind of the peripheral device unless other function than the power supply function of the conventional technique is employed. More specifically, if a headphone is connected to the mobile telephone, signals necessary for the headphone need to be sent through the USB cable. If the mobile telephone is connected to a personal computer, it needs to be operated as a UART (Universal Asynchronous Receiver Transmitter) through the USB cable. Further, the USB terminal needs charging function, and the mobile telephone is demanded to implement adequate operations according to the charging apparatus connected to the USB terminal.
For example, if a Low-power hub is connected to the USB terminal, the mobile telephone on the device side needs to be charged with a charging current of 100 mA or less, and if a High-power hub is connected, it needs to be charged with a charging current of 200 mA or more.